package org.fgtv.gospel.domain;
// Generated 2011. 5. 22 오후 5:00:36 by Hibernate Tools 3.2.2.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 게시판정보를 저장하는 클래스 입니다.
 * @author bumbooForest(with help from Hibernate)
 *         
 */
@Entity
@Table(name="Board"
)
public class Board  implements java.io.Serializable {


     private int id;
     /**
      * 게시판ID
     */
     private String boardId;
     /**
      * 게시판명
     */
     private String boardName;
     /**
      * 게시판종류구분코드
     */
     private String boardClass;
     private Set<BoardContent> boardContent = new HashSet<BoardContent>(0);

    public Board() {
    }

	
    public Board(String boardId, String boardName, String boardClass) {
        this.boardId = boardId;
        this.boardName = boardName;
        this.boardClass = boardClass;
    }
    public Board(String boardId, String boardName, String boardClass, Set<BoardContent> boardContent) {
       this.boardId = boardId;
       this.boardName = boardName;
       this.boardClass = boardClass;
       this.boardContent = boardContent;
    }
   
     @Id @GeneratedValue
    
    @Column(name="ID", nullable=false)
    public int getId() {
        return this.id;
    }
    
    protected void setId(int id) {
        this.id = id;
    }
    /**       
     *      * 게시판ID
     */
    
    @Column(name="boardId", nullable=false, length=30)
    public String getBoardId() {
        return this.boardId;
    }
    
    public void setBoardId(String boardId) {
        this.boardId = boardId;
    }
    /**       
     *      * 게시판명
     */
    
    @Column(name="boardName", nullable=false, length=30)
    public String getBoardName() {
        return this.boardName;
    }
    
    public void setBoardName(String boardName) {
        this.boardName = boardName;
    }
    /**       
     *      * 게시판종류구분코드
     */
    
    @Column(name="boardClass", nullable=false, length=2)
    public String getBoardClass() {
        return this.boardClass;
    }
    
    public void setBoardClass(String boardClass) {
        this.boardClass = boardClass;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinColumn(name="id", updatable=false)
    public Set<BoardContent> getBoardContent() {
        return this.boardContent;
    }
    
    public void setBoardContent(Set<BoardContent> boardContent) {
        this.boardContent = boardContent;
    }




}


